package cn.iocoder.yudao.module.product.job.offerPrice;

import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
import cn.iocoder.yudao.framework.tenant.core.job.TenantJob;
import cn.iocoder.yudao.module.product.service.skuofferpricerelation.SkuOfferPriceRelationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 商品设置定价
 *
 * @author 芋道源码
 */
@Component
@Slf4j
public class SkuOfferPriceJob implements JobHandler {

    @Resource
    private SkuOfferPriceRelationService skuOfferPriceRelationService;

    @Override
    @TenantJob
    public String execute(String param) {
        int count = skuOfferPriceRelationService.handleEffectiveOfferPrice();
        return String.format(" %s 个", count);
    }

}
